xsm: only log dummy override if not setting up dummy_xsm_ops
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Sun, 18 Dec 2011 14:32:49 +0000 (14:32 +0000)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Sun, 18 Dec 2011 14:32:49 +0000 (14:32 +0000)
The log messages from dummy overrides appear on every boot with XSM
enabled, and are just noise when filling in the dummy_xsm_ops
structure.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/xsm/dummy.c

index a629396afe483f2c5a7ffbd858da96dc0654d5dd..d6f2da023fb394d0c3fd6dbf0e8afbb645af1fec 100644 (file)
@@ -469,14 +469,15 @@ static int dummy_ioport_permission (struct domain *d, uint32_t s, uint32_t e, ui
 
 struct xsm_operations dummy_xsm_ops;
 
-#define set_to_dummy_if_null(ops, function)                        \
-    do {                                                           \
-        if ( !ops->function )                                      \
-        {                                                          \
-            ops->function = dummy_##function;                      \
-            dprintk(XENLOG_DEBUG, "Had to override the " #function \
-                " security operation with the dummy one.\n");      \
-        }                                                          \
+#define set_to_dummy_if_null(ops, function)                            \
+    do {                                                               \
+        if ( !ops->function )                                          \
+        {                                                              \
+            ops->function = dummy_##function;                          \
+            if (ops != &dummy_xsm_ops)                                 \
+                dprintk(XENLOG_DEBUG, "Had to override the " #function \
+                    " security operation with the dummy one.\n");      \
+        }                                                              \
     } while (0)
 
 void xsm_fixup_ops (struct xsm_operations *ops)